<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta content="en-us" http-equiv="Content-Language" />
    <meta content="en" name="language" />
    <meta
        content="Daslang is high-performance strong statically typed programming language designed to be data oriented in C++ environment."
        name="description" />
    <meta content="game development, programming language, programming, programming, development, open source"
        name="keywords" />
    <meta content="width=device-width, initial-scale=1.0, shrink-to-fit=no" name="viewport" />
    <title>Daslang - The High Performance Programming Language</title>
    <link href="doc/_static/daslang.ico" rel="icon" type="image/x-icon" />
    <link
        href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic|Source+Code+Pro:400|Lato:400|Sanchez:400italic,400"
        rel="stylesheet" type="text/css" />
    <link href="files/style.css" rel="stylesheet" type="text/css" />
    <script charset="utf-8" src="files/button.js"></script>
</head>

<body>
    <header>
        <nav id="menu">
            <a href="#overview">Overview</a>
            <a href="#look">What does it look like?</a>
            <a href="#download">Download</a>
            <a href="#devstate">Development State</a>
            <a href="#performance">Performance</a>
            <a href="#work">Work in Progress</a>
            <a href="#documentation">Documentation</a>
            <a href="#sandbox">Sandbox</a>
            <a href="https://github.com/GaijinEntertainment/daScript/wiki">Wiki</a>
            <a href="https://borisbat.github.io/dascf-blog/">Dev Blog</a>
        </nav>
    </header>

    <main>
        <div class="intro">
            <h1>
                <img src="doc/_static/daslang.png" alt="Daslang" width="192" height="192" />
            </h1>
        </div>
        <div class="news">
            <h2>News</h2>
            <ul  style="list-style-type:none;">
            <li>
                <b>June 10th, 2025</b>: We now have LINQ-like capabilities in Daslang.
                <a href="https://borisbat.github.io/dascf-blog/2025/10/08/linq-that/#more">See blog for details.</a>
            </li>
            <li>
                <b>May 6th, 2025</b>: Overview of gen2 syntax as well as gen1.5 syntax, as well as conversion process.
                <a href="https://borisbat.github.io/dascf-blog/2025/05/04/gen2-syntax/">All about 'options gen2'</a>
            </li>
            <li>
                <b>Oct 10th, 2024</b>: Version 0.5 of Daslang has been released. This version includes a lot of new features and improvements,
                such as JIT, serialization, performance improvements, new syntax features.
                <a href="https://borisbat.github.io/dascf-blog/2024/10/10/zero-point-five/">See plans for 0.6 for more details.</a>
            </li>
            <li>
                <b>July 28th, 2024</b>: Massive update on data initialization syntax. Table and set comprehensions are now available.
                See the <a href="https://borisbat.github.io/dascf-blog/2024/07/23/data-initialization/">Data Initialization in DAS</a> for more details.
            </li>
            <li>
                <b>July 7th, 2024</b>: Version 0.5 is coming very soon. It will include a lot of new features and improvements. Stay tuned!
                Expect JIT, serialization, performance improvements, new syntax features, and more.
            </li>
            <li>
                <b>July 1st, 2024</b>: daScript renamed to Daslang!
            </li>
            <li>
                <b>May 1st, 2023</b>: Version 0.4 of Daslang has been released. The development team is currently working on the next major release,
                which will include a fully featured JIT compiler. This JIT compiler is currently available as a preview.
            </li>
            <li>
                <b>1st Jan 2023</b>: Daslang now happily runs in the web browser. <a href="https://gaijinentertainment.github.io/try-dascript/">Check it out</a>.
            </li>
            <li>
                <b>14 Dec 2022</b>: We now have <a href="https://borisbat.github.io/dascf-blog">an official blog</a>
            </li>
            <li>
                <b>November 18th, 2021</b>: Version 0.3 released.
            </li>
            <li>
                <b>September 5th,  2020</b>: Version 0.2 released.
            </li>
            <li>
                <b>24 August 2020</b>: A lot of documentation has been added.<br>
                <a href="https://tiorun.gaijin.team/##S0ksTi7KLCj5/z86taIgv6gklislNU0hNzEzj0sBCAqKMvNKNJQ8UnNy8nUUwvOLclIUlTS5/v8HAA" title="Daslang – Try It Online">tio.run sandbox</a>
                added.
            </li>
            <li>
                <b>28 October 2019</b>: Benchmarks has been updated. All lang compilers
                were built in LLVM8.0, architecture AVX.
            </li>
            <li>
                <b>15 August 2019</b>: <b>Daslang site</b> has been released, check it
                out.
            </li>
        </ul>
        </div>

        <h2 id="overview">Overview</h2>

        <p>
            Daslang (former daScript) is a high-level programming language that features strong static typing.
            It is designed to provide <b>high performance</b> and serves as an embeddable 'scripting' language
            for C++ applications that require fast and reliable performance, such as <b>games</b> or <b>back end/servers</b>.
            Additionally, it functions effectively as a standalone programming language.
        </p>

        <p>Daslang is:</p>
        <ul>
            <li>
                <b>Extremely fast</b> programming language that can rival compiled or JIT languages even in interpreter mode.
                It consistently outperforms dynamically interpreted scripting languages such as Lua. When used in AOT mode,
                Daslang is often faster than naively written C++ due to its SSE-friendly POD-types, and it even surpasses some
                of the best JIT VMs like V8 or LuaJIT. As a result, there's no need to rewrite your Daslang code in C++ to optimize your application.
            </li>
            <li>
                <b>Safe and versatile</b> programming language that provides all the benefits of static typing. Many errors that would break an
                application in runtime in languages like Lua or JavaScript won't even compile in Daslang. Additionally, due to its support for
                generics, type inference, and macros, Daslang is easy and fluid to use. Safety is a fundamental pillar of Daslang's design,
                making it safer in many cases than languages like C++ or Java.
            </li>
            <li>
                Real <b>embedded</b> programming language that requires no external dependencies other than a C++17 compiler. Its interop capabilities
                are both super easy to use and safe, as is expected from any embedded scripting language that's meant to call native code.
            </li>
        </ul>
        <p>
            Daslang offers a wide range of features like:
        </p>
        <ul>
            <li>amazing performance</li>
            <li>strong static typing</li>
            <li>instant hot reload</li>
            <li>Ruby-like blocks</li>
            <li>semantic indenting</li>
            <li>lexical scoping</li>
            <li>high performance interpretation</li>
            <li>Ahead-of-Time compilation (optimization for release build)</li>
            <li>generators</li>
            <li>generics and type inference</li>
            <li>macros</li>
            <li>optional types (i.e. pointers)</li>
            <li>native HW friendly POD types</li>
            <li>C++ friendly and fast interop</li>
            <li>semi-manual memory management</li>
            <li>
                fast and easy-to-reset execution context, allowing automatic burst
                free memory management for stored procedures
                <br />
                no memory leaks with no GC/reference counting cost.
            </li>
            <li>extendable type and function system</li>
            <li>
                cheap multi-threading support - explicit separation of execution
                context and code context.
            </li>
            <li>
                Open Source
                <a href="https://opensource.org/licenses/BSD-3-Clause">BSD licence</a>
            </li>
            <li>
                powerful embedding API
                <ul>
                    <li>e.g. functions can be defined by scripts or in C++</li>
                    <li>
                        e.g. objects can fully exist in the Context or be bound to native
                        code
                    </li>
                    <li>and more</li>
                </ul>
            </li>
        </ul>

        <p>
            Daslang takes inspiration from languages like Python, Ruby, Kotlin, and Haxe when it comes to its explicitness and readability.
            However, it is also designed to be extremely fast, making it an ideal choice for performance-critical applications.
        </p>

        <p>
            A Visual Studio Code extension is available for Daslang, providing comprehensive support for the language. This extension offers features
            such as code diagnostics, code completion, code navigation, hints, and more. Additionally, it provides a rich debugging environment, allowing
            developers to easily debug their Daslang code. It also includes a profiler for measuring and optimizing code performance. You can find this
            extension on the Visual Studio Code Marketplace at the following link:
            <a href="https://marketplace.visualstudio.com/items?itemName=profelis.dascript-plugin">https://marketplace.visualstudio.com/items?itemName=profelis.dascript-plugin</a>.
        </p>

        <h2 id="look">What Does it look like?</h2>
        <p>
            Daslang's syntax is reminiscent of (Typed) Python, while its static strong typed nature is similar to ML or Zig.
            Its POD types are closely aligned with hardware/machine types. Additionally, the language makes use of type inference,
            as can be seen in the following Fibonacci code snippet.
        </p>

        <div class="snippets">
            <pre><code>def fibR(n)
    if (n < 2)
        return n
    else
        return fibR(n - 1) + fibR(n - 2)

def fibI(n)
    var last = 0
    var cur = 1
    for i in range(0, n-1)
        let tmp = cur
        cur += last
        last = tmp
    return cur</code></pre>
            Also, for those who for some reason prefer curly brackets over Python-style indenting, it is also possible to write:
            <pre><code>
def fibR(n) {
    if (n < 2) {
        return n;
    } else {
        return fibR(n - 1) + fibR(n - 2);
    }
}
def fibI(n) {
    var last = 0;
    var cur = 1;
    for i in range(0, n-1); {
        let tmp = cur;
        cur += last;
        last = tmp;
    }
    return cur;
}</code></pre>
        (Note that within curly brackets semicolons (;) are required to separate statements).
        </div>

        <h2 id="devstate">Development state</h2>
        <p>
            Daslang's current version is 0.5, and it's already being used in production projects at Gaijin Entertainment.
            Until the release of version 1.0, there will be no patches or fixes for older versions.
            Instead, all updates and fixes will be made available exclusively in the master branch.
        </p>
        <p>
            Daslang has been successfully compiled and run on a wide range of platforms, including Windows (x86 & x64), Linux (x64),
            macOS, Xbox One, Xbox One Series X, PlayStation 4, PlayStation 5, Nintendo Switch, iOS, Android, and WebAssembly.
        </p>
        <p>
            Has been tested with the following compilers with C++17 support:
        </p>
        <blockquote>
            <p>
                MS Visual C++ 17, 19, and 22 (x86 &amp; x64)<br />
                Linux GCC<br />
                LLVM 7 and above<br />
            </p>
        </blockquote>
        <p>
            To compile, Daslang requires support for C++17.
        </p>

        <h2 id="performance">Performance</h2>
        <p>
            As an interpreted language, Daslang typically outperforms everything, including the blazing fast <b>LuaJIT</b>.
        </p>
        <p>
            Daslang particularly excels in interop with C++ functions, providing an easy and seamless experience when it comes to integrating new functions and types.
        </p>
        <p>
            The overhead of data-oriented processing in interpretation mode in Daslang is comparable to C++ in Debug mode, as demonstrated by the Particles sample.
        </p>

        <small>Tested on AMD Ryzen Threadripper 3990X 64-Core Processor at Mon Sep 30 15:32:40 2024</small><br>
        <small>CLANG 17.0.6</small><br>

        <h2>Interpreted</h2>
        <h3>dictionary</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar" style="width: 16.989189189189187%;">0.0189&nbsp (1.13)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 59.45945945945946%;">0.0660&nbsp (3.96)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar featured" style="width: 15.002342342342342%;">0.0167&nbsp (1.00)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 27.664144144144142%;">0.0307&nbsp (1.84)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 91.89189189189189%;">0.1020&nbsp (6.13)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 79.2791891891892%;">0.0880&nbsp (5.28)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 100%;">0.1110&nbsp (6.67)</div></td></tr>
        </table>
        <h3>exp loop</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 14.283908045977011%;">0.0124&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 59.77011494252874%;">0.0520&nbsp (4.18)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 43.93183908045978%;">0.0382&nbsp (3.08)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 23.408505747126437%;">0.0204&nbsp (1.64)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 100%;">0.0870&nbsp (7.00)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 98.85057471264368%;">0.0860&nbsp (6.92)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 97.70114942528737%;">0.0850&nbsp (6.84)</div></td></tr>
        </table>
        <h3>fibonacci loop</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 25.58345323741007%;">0.0356&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 64.74820143884892%;">0.0900&nbsp (2.53)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 32.66676258992805%;">0.0454&nbsp (1.28)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 55.77510791366905%;">0.0775&nbsp (2.18)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 90.64748201438849%;">0.1260&nbsp (3.54)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 100%;">0.1390&nbsp (3.91)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 79.85611510791367%;">0.1110&nbsp (3.12)</div></td></tr>
        </table>
        <h3>fibonacci recursive</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 19.463272727272727%;">0.0535&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 37.090909090909086%;">0.1020&nbsp (1.91)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 21.399745454545453%;">0.0588&nbsp (1.10)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 32.44021818181818%;">0.0892&nbsp (1.67)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 60.72727272727273%;">0.1670&nbsp (3.12)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 93.81818181818181%;">0.2580&nbsp (4.82)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 100%;">0.2750&nbsp (5.14)</div></td></tr>
        </table>
        <h3>float2string</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 2.115697674418605%;">0.0764&nbsp (1.01)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 17.19269102990033%;">0.6210&nbsp (8.19)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 4.76952934662237%;">0.1723&nbsp (2.27)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar featured" style="width: 2.099717607973422%;">0.0758&nbsp (1.00)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 100%;">3.6120&nbsp (47.63)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 2.9900332225913617%;">0.1080&nbsp (1.42)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 2.96234772978959%;">0.1070&nbsp (1.41)</div></td></tr>
        </table>
        <h3>mandelbrot</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 1.8542682926829268%;">0.0030&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 100%;">0.1640&nbsp (53.93)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 36.423780487804876%;">0.0597&nbsp (19.64)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 33.81981707317073%;">0.0555&nbsp (18.24)</div></td></tr>
        </table>
        <h3>n-bodies</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 8.584089979550104%;">0.2099&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 51.124744376278116%;">1.2500&nbsp (5.96)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 22.864478527607364%;">0.5590&nbsp (2.66)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 28.270098159509203%;">0.6912&nbsp (3.29)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 100%;">2.4450&nbsp (11.65)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 9.815950920245399%;">0.2400&nbsp (1.14)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 11.738241308793455%;">0.2870&nbsp (1.37)</div></td></tr>
        </table>
        <h3>native loop</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 4.222755392681555%;">0.0372&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 100%;">0.8819&nbsp (23.68)</div></td></tr>
        </table>
        <h3>particles kinematics</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 0.7949630624580255%;">0.0118&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 82.40429818670249%;">1.2270&nbsp (103.66)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 20.19722632639355%;">0.3007&nbsp (25.41)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 26.35768972464741%;">0.3925&nbsp (33.16)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 96.9778374748153%;">1.4440&nbsp (121.99)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 40.89993284083277%;">0.6090&nbsp (51.45)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 100%;">1.4890&nbsp (125.79)</div></td></tr>
        </table>
        <h3>primes loop</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 12.233333333333334%;">0.0411&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 28.57142857142857%;">0.0960&nbsp (2.34)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 20.55044642857143%;">0.0690&nbsp (1.68)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 28.047410714285714%;">0.0942&nbsp (2.29)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 38.98809523809524%;">0.1310&nbsp (3.19)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 99.40476190476191%;">0.3340&nbsp (8.13)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 100%;">0.3360&nbsp (8.17)</div></td></tr>
        </table>
        <h3>queen</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar" style="width: 31.799999999999994%;">0.0013&nbsp (1.01)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 50%;">0.0020&nbsp (1.60)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar featured" style="width: 31.3425%;">0.0013&nbsp (1.00)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 44.01%;">0.0018&nbsp (1.40)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 99.99974999999999%;">0.0040&nbsp (3.19)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 100%;">0.0040&nbsp (3.19)</div></td></tr>
        </table>
        <h3>sha256</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 16.49282618159149%;">0.1213&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 34.55609852422014%;">0.2541&nbsp (2.10)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 100%;">0.7353&nbsp (6.06)</div></td></tr>
        </table>
        <h3>sort</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar" style="width: 34.744565217391305%;">0.0320&nbsp (1.33)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 100%;">0.0920&nbsp (3.83)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 76.18086956521739%;">0.0701&nbsp (2.92)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 57.68413043478261%;">0.0531&nbsp (2.21)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar featured" style="width: 26.08695652173913%;">0.0240&nbsp (1.00)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 30.434782608695656%;">0.0280&nbsp (1.17)</div></td></tr>
        </table>
        <h3>spectral norm</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 13.799054054054052%;">0.2042&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 40.067567567567565%;">0.5930&nbsp (2.90)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 19.556750000000005%;">0.2894&nbsp (1.42)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 16.155385135135138%;">0.2391&nbsp (1.17)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 60%;">0.8880&nbsp (4.35)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 97.22972972972973%;">1.4390&nbsp (7.05)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 100%;">1.4800&nbsp (7.25)</div></td></tr>
        </table>
        <h3>string2float</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar featured" style="width: 6.350762527233115%;">0.0291&nbsp (1.00)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 44.44444444444444%;">0.2040&nbsp (7.00)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar" style="width: 29.677647058823524%;">0.1362&nbsp (4.67)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 27.684858387799565%;">0.1271&nbsp (4.36)</div></td></tr>
        <tr><th>QUICKJS</th><td><div class="chart-bar" style="width: 100%;">0.4590&nbsp (15.75)</div></td></tr>
        <tr><th>QUIRREL</th><td><div class="chart-bar" style="width: 66.66666666666666%;">0.3060&nbsp (10.50)</div></td></tr>
        <tr><th>SQUIRREL3</th><td><div class="chart-bar" style="width: 93.4640522875817%;">0.4290&nbsp (14.72)</div></td></tr>
        </table>
        <h3>tree</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>DAS INTERPRETER</th><td><div class="chart-bar" style="width: 60.326341127922966%;">1.7543&nbsp (1.17)</div></td></tr>
        <tr><th>LUA</th><td><div class="chart-bar" style="width: 100%;">2.9080&nbsp (1.94)</div></td></tr>
        <tr><th>LUAJIT -joff</th><td><div class="chart-bar featured" style="width: 51.56968707015132%;">1.4996&nbsp (1.00)</div></td></tr>
        <tr><th>LUAU</th><td><div class="chart-bar" style="width: 60.826722833562584%;">1.7688&nbsp (1.18)</div></td></tr>
        </table>


        <p>
            As a compiled Ahead-of-Time language, Daslang is significantly faster than both LuaJIT and Chrome JS, both of which have extremely fast Just-in-Time compilers.
        </p>
        <p>
            In terms of performance, Daslang is nearly on par with naive C++ (compiled with clang-cl llvm 8.0.1 with all optimizations), typically differing by no more than 10%. In some cases, Daslang can even outperform C++.
        </p>
        <p>
            Daslang Just-in-Time compilation is based on LLVM backend, and often outperforms C++, due to Daslang providing more information to LLVM than AOT.
        </p>
        <p>
            It is worth noting that unlike Just-in-Time compilation, Ahead-of-Time compilation can be used on any platform, including those with signed binary executables like iOS or consoles.
        </p>

        <small>Tested on AMD Ryzen Threadripper 3990X 64-Core Processor at Mon Sep 30 15:32:40 2024</small><br>
        <small>CLANG 17.0.6</small><br>

        <h2>AOT or JIT</h2>
        <h3>dictionary</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 100%;">0.0795&nbsp (7.87)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 55.21356665430057%;">0.0439&nbsp (4.34)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 12.712764954067291%;">0.0101&nbsp (1.00)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar" style="width: 13.144111118796253%;">0.0105&nbsp (1.03)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 15.239472575564179%;">0.0121&nbsp (1.20)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 29.311543854574722%;">0.0233&nbsp (2.31)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 96.32400007545414%;">0.0766&nbsp (7.58)</div></td></tr>
        </table>
        <h3>exp loop</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 33.53407591312711%;">0.0060&nbsp (1.63)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar featured" style="width: 20.611062649578386%;">0.0037&nbsp (1.00)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar" style="width: 34.67422666577199%;">0.0062&nbsp (1.68)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 20.72848867118477%;">0.0037&nbsp (1.01)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 100%;">0.0179&nbsp (4.85)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 47.32156836431143%;">0.0085&nbsp (2.30)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 55.95909101075846%;">0.0100&nbsp (2.72)</div></td></tr>
        </table>
        <h3>fibonacci loop</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 9.115167983136192%;">0.0030&nbsp (1.89)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar featured" style="width: 4.846516813544659%;">0.0016&nbsp (1.00)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 4.825193358048233%;">0.0016&nbsp (1.00)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar" style="width: 5.815210934667979%;">0.0019&nbsp (1.21)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 14.560873896130403%;">0.0048&nbsp (3.02)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 100%;">0.0328&nbsp (20.72)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 9.12918053960527%;">0.0030&nbsp (1.89)</div></td></tr>
        </table>
        <h3>fibonacci recursive</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 10.50339824132082%;">0.0063&nbsp (1.56)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 7.201846064901344%;">0.0043&nbsp (1.07)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 6.744981550980265%;">0.0041&nbsp (1.00)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar" style="width: 7.510852608862506%;">0.0045&nbsp (1.11)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 21.407508194488052%;">0.0129&nbsp (3.17)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 100%;">0.0602&nbsp (14.83)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 14.136883253672774%;">0.0085&nbsp (2.10)</div></td></tr>
        </table>
        <h3>float2string</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 62.09374644136687%;">0.2835&nbsp (4.22)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 66.16780104941354%;">0.3021&nbsp (4.49)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 14.748946644592193%;">0.0673&nbsp (1.00)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 14.723762471640434%;">0.0672&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 34.24957734388003%;">0.1564&nbsp (2.33)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 15.20931332615037%;">0.0695&nbsp (1.03)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 100%;">0.4566&nbsp (6.79)</div></td></tr>
        </table>
        <h3>mandelbrot</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 5.270359336690307%;">0.0020&nbsp (4.45)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar featured" style="width: 1.1837283488439536%;">0.0004&nbsp (1.00)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar" style="width: 1.6530015027286387%;">0.0006&nbsp (1.40)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar" style="width: 1.212728375207614%;">0.0005&nbsp (1.02)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 20.02689093353721%;">0.0076&nbsp (16.92)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 100%;">0.0379&nbsp (84.48)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 10.538873217157471%;">0.0040&nbsp (8.90)</div></td></tr>
        </table>
        <h3>n-bodies</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 16.943646013269984%;">0.0390&nbsp (1.89)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 11.74113799323641%;">0.0270&nbsp (1.31)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar" style="width: 11.914919869177004%;">0.0274&nbsp (1.33)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 8.981047348609918%;">0.0207&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 35.61976699326074%;">0.0820&nbsp (3.97)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 100%;">0.2302&nbsp (11.13)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 34.97794707994314%;">0.0805&nbsp (3.89)</div></td></tr>
        </table>
        <h3>native loop</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 100%;">0.1615&nbsp (13.20)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 7.584448969660347%;">0.0122&nbsp (1.00)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 7.596831743488362%;">0.0123&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar featured" style="width: 7.573242559345991%;">0.0122&nbsp (1.00)</div></td></tr>
        </table>
        <h3>particles kinematics</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 3.226976830514347%;">0.0069&nbsp (2.32)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 1.624750679583217%;">0.0035&nbsp (1.17)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 1.3897121197353577%;">0.0030&nbsp (1.00)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 1.393909236875498%;">0.0030&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 93.11635481309071%;">0.1997&nbsp (67.00)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 100%;">0.2144&nbsp (71.96)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 42.675727465328315%;">0.0915&nbsp (30.71)</div></td></tr>
        </table>
        <h3>primes loop</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 98.4665215588723%;">0.0380&nbsp (2.82)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 100%;">0.0386&nbsp (2.87)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 35.08758291873963%;">0.0135&nbsp (1.01)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 34.893242122719734%;">0.0135&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 35.37080223880597%;">0.0137&nbsp (1.01)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 90.71957918739635%;">0.0350&nbsp (2.60)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 98.46626243781095%;">0.0380&nbsp (2.82)</div></td></tr>
        </table>
        <h3>queen</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 100%;">0.0050&nbsp (43.86)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 2.3398128149748016%;">0.0001&nbsp (1.03)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar" style="width: 2.8597712183025354%;">0.0001&nbsp (1.25)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 2.279817614590833%;">0.0001&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 8.82529397648188%;">0.0004&nbsp (3.87)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 17.522598192144628%;">0.0009&nbsp (7.69)</div></td></tr>
        </table>
        <h3>sha256</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 1.4122202226037857%;">0.0080&nbsp (1.64)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar" style="width: 0.9134219356141695%;">0.0052&nbsp (1.06)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 0.8632843573933686%;">0.0049&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 5.992852923532778%;">0.0339&nbsp (6.94)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 100%;">0.5664&nbsp (115.84)</div></td></tr>
        </table>
        <h3>sort</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 17.810214177970618%;">0.0130&nbsp (2.37)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 7.827024538742607%;">0.0057&nbsp (1.04)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 7.529726389800344%;">0.0055&nbsp (1.00)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar" style="width: 13.1208496424887%;">0.0096&nbsp (1.74)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 100%;">0.0730&nbsp (13.28)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 65.4432687999978%;">0.0478&nbsp (8.69)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 13.696265414635015%;">0.0100&nbsp (1.82)</div></td></tr>
        </table>
        <h3>spectral norm</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar featured" style="width: 20.92246746883756%;">0.0120&nbsp (1.00)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 21.484603166023568%;">0.0123&nbsp (1.03)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar" style="width: 21.456705612813344%;">0.0123&nbsp (1.03)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar" style="width: 21.57003942272988%;">0.0124&nbsp (1.03)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 25.58502040880377%;">0.0147&nbsp (1.22)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 100%;">0.0574&nbsp (4.78)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 45.34764710292628%;">0.0260&nbsp (2.17)</div></td></tr>
        </table>
        <h3>string2float</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 57.480708392260794%;">0.1065&nbsp (4.41)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar" style="width: 54.767068101897884%;">0.1015&nbsp (4.20)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar featured" style="width: 13.028344000082019%;">0.0241&nbsp (1.00)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar featured" style="width: 13.083381941188183%;">0.0242&nbsp (1.00)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 63.303236932401%;">0.1173&nbsp (4.86)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 62.50480907500106%;">0.1158&nbsp (4.80)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 100%;">0.1853&nbsp (7.68)</div></td></tr>
        </table>
        <h3>tree</h3>
        <table class="chart" style="width: 600px;">
        <tr><th>.NET</th><td><div class="chart-bar" style="width: 17.655130001504503%;">0.2465&nbsp (1.41)</div></td></tr>
        <tr><th>C++</th><td><div class="chart-bar featured" style="width: 12.511454756388652%;">0.1747&nbsp (1.00)</div></td></tr>
        <tr><th>DAS AOT</th><td><div class="chart-bar" style="width: 12.726210179750788%;">0.1777&nbsp (1.02)</div></td></tr>
        <tr><th>DAS JIT</th><td><div class="chart-bar" style="width: 12.719192496693275%;">0.1776&nbsp (1.02)</div></td></tr>
        <tr><th>LUAJIT</th><td><div class="chart-bar" style="width: 69.07872787738073%;">0.9647&nbsp (5.52)</div></td></tr>
        <tr><th>LUAU --codegen</th><td><div class="chart-bar" style="width: 100%;">1.3965&nbsp (7.99)</div></td></tr>
        <tr><th>MONO</th><td><div class="chart-bar" style="width: 18.549984843952863%;">0.2590&nbsp (1.48)</div></td></tr>
        </table>

        <p>All samples for all languages in comparison are available in
            <a href="https://github.com/GaijinEntertainment/daScript/tree/master/examples/profile/tests">GitHub</a>
        </p>

        <h2 id="work">Work in Progress</h2>
        <p></p>
        <ul>
            <li>Just-in-time and LLVM AoT backend</li>
            <li>AOT optimizations</li>
            <li>Tutorials</li>
        </ul>

        <h2 id="documentation">Documentation</h2>

        <h3>Daslang 0.4</h3>
        <p>
            Online
            <a href="doc/index.html">Daslang 0.4 reference manual and Standard Libraries manual</a>
        </p>
        <p>
            Offline Reference Manual (<a href="doc/dascript.pdf">PDF</a>)<br />
            Offline Standard Libraries Manual (<a href="doc/dascriptstdlib.pdf">PDF</a>)
        </p>

        <h2 id="sandbox">Sandbox</h2>

        <p>
            <a href="https://gaijinentertainment.github.io/try-dascript/" title="Daslang – Try It Online">Try it in your browser</a>
            implemented with Emscripten, runs in your browser</a>.
            <br />
            <a href="https://tiorun.gaijin.team/##S0ksTi7KLCj5/z86taIgv6gklislNU0hNzEzj0sBCAqKMvNKNJQ8UnNy8nUUwvOLclIUlTS5/v8HAA" title="Daslang – Try It Online">Try it online</a>
            implemented with <a href="https://tio.run">tio.run fork</a>.
        </p>

        <h2 id="download">Download</h2>

        <h3>GitHub Repository</h3>
        <p>
            Daslang's GitHub repository is
            <a href="https://github.com/GaijinEntertainment/daScript">here</a>
        </p>
        <h3>Authors blog</h3>
        <p>
            <a href="https://borisbat.github.io/dascf-blog">Boris Batkin blog on Daslang (in English)</a>
        </p>
        <h3>Other useful links</h3>
        <p>
            <a href="https://github.com/profelis/daScript-plugin">Language server plugin for VSCode with auto-completion, help, etc - itself written in Daslang.</a><br />
            <a href="https://borisbat.github.io/dascf-blog/">Blog about Daslang developments</a><br />
            <a href="https://github.com/imp5imp5/dasbox/">dasBox - simple framework allowing create games in Daslang.</a><br />
            <a href="https://80.lv/articles/a-look-at-the-current-state-of-independent-gamedev-software-production/">Article on history of Daslang.</a><br />
            <a href="https://spiiin.github.io/tags/dascript/">Spiiin's blog on Daslang (in Russian)</a><br />
        </p>
    </main>

    <footer>
        <p>
            Copyright ©2023 <a href="https://gaijin.net">Gaijin Entertainment</a>| All
            Rights Reserved.
        </p>
    </footer>
</body>

</html>
